package weixin


const (
	QWxBaseUrl       = "https://qyapi.weixin.qq.com"
	//QiAccessTokenUrl 获取access_token
	QiAccessTokenUrl = "%s/cgi-bin/gettoken?corpid=%s&corpsecret=%s"
)

const (
	WxBaseUrl       = "https://api.weixin.qq.com"
	//Code2sessionURL 获取openid
	Code2sessionURL = "%s/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code"
	//AccessTokenUrl 获取access_token
	AccessTokenUrl = "%s/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"
)

const (
	//BotSendUrl 发送消息
	BotSendUrl = "%s/cgi-bin/webhook/send?key=%s"
	BotUploadFileUrl = "%s/cgi-bin/webhook/upload_media?key=%s&type=%s"
	SendTextType = "text"
	SendMarkDownType = "markdown"
	SendPicTextType = "news"
	SendImageType = "image"
	SendFileType = "file"
	SendFileName = "media"
)

type Weixiner interface {
	AccessToken() (string,error)
}

